package yxy.game.pm2.module.battle;

import yxy.cherry.data.DataCenter;
import yxy.cherry.data.bean.weapondata;

public class WeaponModule {

	private int weaponId;// 数据id
	private int level; // 等级
	private int refineLevel;// 精炼等级
	private int soulLevel;// 铸魂等级
	private int skillLevel;// 技能等级
	private int anger;// 初始怒气

	public int getWeaponId() {
		return weaponId;
	}

	public void setWeaponId(int weaponId) {
		this.weaponId = weaponId;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public int getRefineLevel() {
		return refineLevel;
	}

	public void setRefineLevel(int refineLevel) {
		this.refineLevel = refineLevel;
	}

	public int getSoulLevel() {
		return soulLevel;
	}

	public void setSoulLevel(int soulLevel) {
		this.soulLevel = soulLevel;
	}

	public int getSkillLevel() {
		return skillLevel;
	}

	public void setSkillLevel(int skillLevel) {
		this.skillLevel = skillLevel;
	}

	public int getAnger() {
		return anger;
	}

	public void setAnger(int anger) {
		this.anger = anger;
	}

	static public WeaponModule create(int weaponId, int level, int refineLevel, int soulLevel, int skillLevel) {
		weapondata data = DataCenter.getData(weaponId, weapondata.class);
		if (data == null) {
			return null;
		}
		WeaponModule module = new WeaponModule();
		module.setWeaponId(weaponId);
		module.setLevel(level);
		module.setRefineLevel(refineLevel);
		module.setSoulLevel(soulLevel);
		module.setSkillLevel(skillLevel);

		return module;
	}
}
